package com.generator.service.courseAnswers.impl;

import com.generator.dao.courseAnswers.CourseAnswersDao;
import com.generator.entity.courseAnswers.CourseAnswers;
import com.generator.service.courseAnswers.CourseAnswersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CourseAnswersServiceBean implements CourseAnswersService {

    @Autowired
    private CourseAnswersDao courseAnswersDao;

    @Override
    public void addCourseAnswers(CourseAnswers courseAnswers) {
        courseAnswersDao.addCourseAnswers(courseAnswers);
    }

    @Override
    public void delCourseAnswers(int eid) {
        courseAnswersDao.delCourseAnswers(eid);
    }

    @Override
    public void updateCourseAnswers(CourseAnswers courseAnswers) {
        courseAnswersDao.updateCourseAnswers(courseAnswers);
    }

    @Override
    public CourseAnswers findCourseAnswerById(int eid) {
        return courseAnswersDao.findCourseAnswerById(eid);
    }

    @Override
    public List<CourseAnswers> findAllCourseAnswers() {
        return courseAnswersDao.findAllCourseAnswers();
    }
}
